package com.winter.service.impl;

import com.winter.mapper.AdminMapper;
import com.winter.model.Admin;
import com.winter.model.AdminExample;
import com.winter.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    private AdminMapper adminMapper;
    @Override
    public List<Admin> selectAdmin(String name) {
        AdminExample adminExample = new AdminExample();
        AdminExample.Criteria criteria = adminExample.createCriteria().andNameEqualTo(name);
        List<Admin> admins = adminMapper.selectByExample(adminExample);
        return admins;
    }
}
